
TEST_DOMAIN_FILE_EXTENTION	= cpp
TEST_DOMAIN_SRC_PATH     	= $(TEST_DOMAIN_PATH)/source
TEST_DOMAIN_RES_SRC_PATH	= $(TEST_DOMAIN_PATH)/resource
TEST_DOMAIN_INCLUDE_PATH 	= $(TEST_PUB_INCLUDE_PATH) $(DOMAIN_INCLUDE_PATH)
TEST_DOMAIN_OBJS_PATH    	= $(TEST_OBJS_PATH)/DOMAIN
TEST_DOMAIN_DEPS_PATH		= $(TEST_DEPS_PATH)/DOMAIN
TEST_DOMAIN_RES_BUILD_PATH	= $(TEST_RESS_PATH)/DOMAIN
TEST_DOMAIN_CFLAGS			= $(TEST_CODE_CFLAGS) -DRESOURCE_PATH=\"Resource/TEST/DOMAIN/\"
TEST_DOMAIN_DEPEND_CFLAGS	= $(TEST_DEPEND_CFLAGS)

TEST_DOMAIN_INCLUDE = $(addprefix -I, $(TEST_DOMAIN_INCLUDE_PATH))
TEST_DOMAIN_SRCS	= $(wildcard $(TEST_DOMAIN_SRC_PATH)/*.$(TEST_DOMAIN_FILE_EXTENTION))
TEST_DOMAIN_OBJS	= $(addprefix $(TEST_DOMAIN_OBJS_PATH)/,$(notdir $(subst .$(TEST_DOMAIN_FILE_EXTENTION),.o,$(TEST_DOMAIN_SRCS))))
TEST_DOMAIN_DEPS	= $(addprefix $(TEST_DOMAIN_DEPS_PATH)/,$(notdir $(subst .$(TEST_DOMAIN_FILE_EXTENTION),.d,$(TEST_DOMAIN_SRCS))))
TEST_DOMAIN_SRC_RES	= $(wildcard $(TEST_DOMAIN_RES_SRC_PATH)/*)
TEST_DOMAIN_RESS	= $(addprefix $(TEST_DOMAIN_RES_BUILD_PATH)/,$(notdir $(TEST_DOMAIN_SRC_RES)))
ALL_OBJS 	 += $(TEST_DOMAIN_OBJS)
ALL_DEPS	 += $(TEST_DOMAIN_DEPS)
ALL_RESS	 += $(TEST_DOMAIN_RESS)

$(TEST_DOMAIN_RES_BUILD_PATH)/% : $(TEST_DOMAIN_RES_SRC_PATH)/%
	@$(MKDIR) $(TEST_DOMAIN_RES_BUILD_PATH)
	@echo copy DOMAIN resource:$(notdir $<)
	@$(COPY) $< $@
	@echo Done!

$(TEST_DOMAIN_DEPS_PATH)/%.d : $(TEST_DOMAIN_SRC_PATH)/%.$(TEST_DOMAIN_FILE_EXTENTION)
	@$(MKDIR) $(TEST_DOMAIN_DEPS_PATH)
	@echo Making $(notdir $@) ...
	@$(CC) $(TEST_DOMAIN_DEPEND_CFLAGS) $(TEST_DOMAIN_INCLUDE) $< | sed 's/$*.o:/$(subst /,\/,$(TEST_DOMAIN_OBJS_PATH))\/$*.o $(subst /,\/,$(TEST_DOMAIN_DEPS_PATH))\/$*.d :/g' > $@
	@echo Done!

-include $(TEST_DOMAIN_DEPS)

$(TEST_DOMAIN_OBJS_PATH)/%.o : $(TEST_DOMAIN_SRC_PATH)/%.$(TEST_DOMAIN_FILE_EXTENTION)
	@$(MKDIR) $(TEST_DOMAIN_OBJS_PATH)
	@echo Making $(notdir $@) ...
	@$(CC) $(TEST_DOMAIN_CFLAGS) $(TEST_DOMAIN_INCLUDE) $< -c -o $@
	@echo Done!


